from django.db import models


class Peoples(models.Model):
    s_email = models.CharField(max_length=128, unique=False)
    s_id = models.CharField(max_length=11, unique=True)
    s_pwd = models.CharField(max_length=256)
    username = models.CharField(max_length=20, default=' ')
    is_activate = models.BooleanField(default=False)
    is_delete = models.BooleanField(default=False)
    is_violate = models.CharField(max_length=5)
    g_id = models.CharField(max_length=6)


class Book(models.Model):
    b_name = models.CharField(max_length=64,null=False)
    b_img = models.CharField(max_length=200)
    b_note = models.CharField(max_length=128)
    b_writer = models.CharField(max_length=64)
    b_position = models.CharField(max_length=4,null=False)
    b_num = models.CharField(max_length=10,null=False)
    b_snum = models.CharField(max_length=10)


#
# class Position(models.Model):
#     p_id = models.CharField(max_length=4)
#     p_name = models.CharField(max_length=16)
#
#
# class History(models.Model):
#     b_id = models.CharField(max_length=32)
#     s_id = models.CharField(max_length=11)
#     time_start = models.DateTimeField(auto_now_add=True)
#     time_end = models.DateTimeField()
#     is_return = models.BooleanField(default=False)
